<?php
require_once $GLOBALS['ROO'] . 'Modules/Operative/class.operative.php';

if (isset($_POST['CORR'])) {
    $ent = $_POST['CORR'];
} elseif (isset($_POST['FrwOrigen'])) {
    $ent = $_POST['FrwOrigen'];
} else {
    $ent = '';
}
## Proteccao erro de operador a redireccionar
if($_POST['Channel']==1){ $ent = '';}
$RemessasdoLote = substr($_POST['POOL'], 0, strlen($_POST['POOL']) - 1);
printArray($RemessasdoLote);
/*
$blackList= new BlackList();
 * segundo argumento bloqueia remessas
$RemessasdoLote=$blackList->blacklist($RemessasdoLote);
*/
$doPayOrder = new Operative();
$doPayOrder->Operative_MakePayOrder($ent, $_POST['Channel'], $RemessasdoLote);

include($GLOBALS['PAD'] . 'Modules/FTK9D4D0/Lib/a05_elem_order.mex');
?>
<script>subform('QueryOrders','Console');</script>